package com.yunhai.model.entity.ums;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;

@ApiModel(value = "UmsRolePermission", description = "角色权限关联实体")
@TableName("ums_role_permission")
@Data
@Accessors(chain = true)
public class UmsRolePermission {

    // 复合主键字段（需特殊处理）
    @ApiModelProperty(value = "角色ID", required = true, example = "10001")
    @TableId(value = "role_id")
    private Long roleId;

    @ApiModelProperty(value = "菜单ID", required = true, example = "20001")
    private Long menuId;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private Long createdBy;

    @ApiModelProperty(value = "更新人ID", hidden = true)
    @TableField(fill = FieldFill.UPDATE)
    private Long updatedBy;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间", hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}